#ifndef H_GLOBALS_20071013
#define H_GLOBALS_20071013

#include "types.h"
#include "macros.h"
#include "hashtables.h"
#include "linkedlists.h"

ulong port = 10000;

SecSockets sockets[MAXCLIENTS];
#ifdef USE_SSL
SSL_CTX* serv_ssl_ctx = NULL;
SSL *serv_ssl = NULL;
SSL_METHOD* serv_ssl_meth = NULL;
#endif

HashTable *clientstb = NULL;
HashTable *channelstb = NULL;
HashTable *commandstb = NULL;

pthread_t th_server, th_pinger, th_admin, th_auther;

List* modules_list = NULL;
List *threads_list = NULL;
List* auth_list = NULL;
pthread_mutex_t auth_mutex;
pthread_mutex_t clientinsert_mutex;

int ClientsInsertionOrder = 1;

time_t	starttime;

struct sigaction act, actbp;

int ServRestartFlag = 0;
int ServCloseFlag = 0;

int ThreadsCounter = 1; /* i choosed to compute the main process as a thread */
pthread_mutex_t ThreadsCounter_mutex;

NetworkConfig NetworkConf;
MysqlConfig	  MysqlConf;
ServerConfig  ServerConf;

DebugFile *dfSys = NULL;
DebugFile *dfMem = NULL;


#endif

